/* eslint-disable react-hooks/rules-of-hooks */
/*
 * @Author: your name
 * @Date: 2021-10-05 11:05:48
 * @LastEditTime: 2021-11-08 22:47:45
 * @LastEditors: Shentong
 * @Description: 提现记录
 * @FilePath: /distribution/src/pages/coupon/index.tsx
 */
import React, { useEffect, useState  } from 'react';
import Taro, { render } from '@tarojs/taro';
import { View } from "@tarojs/components";


import {AtInput} from 'taro-ui'

import styles from './index.module.scss'

const record = () => {
    const [amount, setAmount] = useState<string>('')

    const [allPrice, setAllPrice] = useState<string>('100')

    const handleChange = () => {
    }
    const overChange = () => {
        setAmount(allPrice)
    }
    const backClick = () => {
        Taro.navigateTo({
            url: '/pages/account/index'
        })
    }
    return (
        <View className={styles.record}>
            <AtInput
              title='提现金额'
              type='digit'
              placeholder='请输入提现金额'
              value={amount}
              onChange={handleChange}
            />

            <View className={styles.text}>
                <View className={styles.l1}>
                    余额
                </View>
                <View className={styles.l2}>{allPrice}元</View>
                <View onClick={overChange} className={styles.l3}>
                    全部提现
                </View>
            </View>

            <View className={styles.btn}>
                确认
            </View>

            <View className={styles.back} onClick={backClick}>
                返回
            </View>
        </View>
    )
}

export default record;
                   